#pragma once

namespace Tmpl {

class FrameBufferObject
{
public:
	FrameBufferObject();
	virtual ~FrameBufferObject();

	bool Init( int width, int height, int renderTargetCount, unsigned int pixelFormat, bool filter=true );

	void Bind();
	void Unbind();

	void BindTexture( int index = 0 );
	void BindDepthTexture();

	void BindAllTextures();
	void UnbindAllTextures();

	unsigned int GetWidth() { return mWidth; }
	unsigned int GetHeight() { return mHeight; }

protected:
	unsigned int mFboId;
	unsigned int* mTextureId;
	unsigned int mDepthId;

	unsigned int mWidth;
	unsigned int mHeight;

	int	mRenderTargetCount;
};


}
